package com.hakim.wfb.common.enums;

/**
 * 奖励类型枚举
 * Created by Administrator on 2017/7/5.
 */
public enum RewardTypeEnum {

    DIRECTION(1, "直推奖励"),
    PERFORMANCE(2, "业绩奖励");

    private int value;
    private String description;

    private RewardTypeEnum(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public int getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static RewardTypeEnum getByValue(int value) {
        RewardTypeEnum[] codes = values();
        for (RewardTypeEnum each : codes) {
            if (each.value == value) {
                return each;
            }
        }
        return null;
    }
}
